package com.minivision.fdiot.rest;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.minivision.fdiot.service.DiscoveryService;

import io.swagger.annotations.ApiOperation;

@RestController
public class ServiceApi {
  
  @Autowired
  private DiscoveryService discoveryService;
  
  @GetMapping("/services")
  @ApiOperation(hidden = true, value = "获取服务列表")
  public List<String> getServices() {
    return discoveryService.getServiceUrls();
  }
  
  @GetMapping("/status")
  @ApiOperation(hidden = true, value = "获取节点状态")
  public String getStatus() {
    return "ok";
  }

}
